<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
html {
  font-family: Arial,Helvetica,sans-serif;
  background-color: white;
  color: black;
}
table {
  border-collapse: collapse;
  empty-cells: show;
  margin: 1em 0em;
  border: 1px solid black;
}
th, td {
  border: 1px solid black;
  padding: 0.1em 0.2em;
  height: 1.5em;
  width: 12em;
}
td.colspan4, th.colspan4 {
    width: 48em;
}
td.colspan3, th.colspan3 {
    width: 36em;
}
td.colspan2, th.colspan2 {
    width: 24em;
}
th {
  background-color: rgb(192, 192, 192);
  color: black;
  height: 1.7em;
  font-weight: bold;
  text-align: center;
  letter-spacing: 0.1em;
}
td.name {
  background-color: rgb(240, 240, 240);
  letter-spacing: 0.1em;
}
td.name, th.name {
  width: 10em;
}
</style>
<title>Db Resources</title>
</head>
<body>
<h1>Db Resources</h1>
<table border="1" id="setting">
<tr>
<th class="name" colspan="5">Setting</th>
</tr>
<tr>
<td class="name">Library</td>
<td>String</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name">Library</td>
<td>mySQLdbLibrary.py</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
<table border="1" id="variable">
<tr>
<th class="name" colspan="5">Variable</th>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
<table border="1" id="keyword">
<tr>
<th class="name" colspan="5">Keyword</th>
</tr>
<tr>
<td class="name"><a name="keyword_Execute DB Query">Execute DB Query</a></td>
<td>[Arguments]</td>
<td>${query}</td>
<td>${database}=${ACCEDO_DB}</td>
<td>${db_user}=${DB_USER_NAME}</td>
</tr>
<tr>
<td class="name"></td>
<td>...</td>
<td>${db_pwd}=${DB_PASSWORD}</td>
<td>${ip}=${DB_HOST_IP}</td>
<td>${ssh_user}=${SSH ADMIN USER NAME}</td>
</tr>
<tr>
<td class="name"></td>
<td>...</td>
<td>${ssh_pwd}=${SSH ADMIN PASSWORD}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Connect To db</td>
<td>${ip}</td>
<td>${db_user}</td>
<td>${db_pwd}</td>
</tr>
<tr>
<td class="name"></td>
<td>...</td>
<td>${database}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Execute Query</td>
<td>${query}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Close db Connection</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Fetch DB Query Result">Fetch DB Query Result</a></td>
<td>[Arguments]</td>
<td>${query}</td>
<td>${database}=${ACCEDO_DB}</td>
<td>${db_user}=${DB_USER_NAME}</td>
</tr>
<tr>
<td class="name"></td>
<td>...</td>
<td>${db_pwd}=${DB_PASSWORD}</td>
<td>${ip}=${DB_HOST_IP}</td>
<td>${ssh_user}=${SSH ADMIN USER NAME}</td>
</tr>
<tr>
<td class="name"></td>
<td>...</td>
<td>${ssh_pwd}=${SSH ADMIN PASSWORD}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Connect To db</td>
<td>${ip}</td>
<td>${db_user}</td>
<td>${db_pwd}</td>
</tr>
<tr>
<td class="name"></td>
<td>...</td>
<td>${database}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${result}</td>
<td>Execute Query</td>
<td>${query}</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Log</td>
<td>${query}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Log</td>
<td>${result}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Close db Connection</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${result}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Default ApiKey">Get Default ApiKey</a></td>
<td>${key}=</td>
<td>Fetch DB Query Result</td>
<td>select keyHash from api_key limit 1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${key}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid CategoryID and Name">Get Valid CategoryID and Name</a></td>
<td>${key}=</td>
<td>Fetch DB Query Result</td>
<td>select id from category order by id limit 1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${key_name}=</td>
<td>Fetch DB Query Result</td>
<td>select name from category order by id limit 1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${key}</td>
<td>${key_name}</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid VersionID">Get Valid VersionID</a></td>
<td>${id}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT b.id FROM application a, version b WHERE a.id=b.applicationId AND a.ownerAccount=(SELECT id FROM account WHERE TYPE=3 LIMIT 1) ORDER BY a.id DESC LIMIT 1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid VersionID and ApplicationID">Get Valid VersionID and ApplicationID</a></td>
<td>${aid}=</td>
<td>Fetch DB Query Result</td>
<td>select applicationId from version order by id limit 1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${vid}=</td>
<td>Fetch DB Query Result</td>
<td>select id from version order by id limit 1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${aid}</td>
<td>${vid}</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get ApplicationID by VersionID">Get ApplicationID by VersionID</a></td>
<td>[Arguments]</td>
<td>${vid}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${aid}=</td>
<td>Fetch DB Query Result</td>
<td>select applicationId from version where id=${vid};</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${aid}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid OfferingID">Get Valid OfferingID</a></td>
<td>[Arguments]</td>
<td>${aid}=1</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${id}=</td>
<td>Fetch DB Query Result</td>
<td>select id from offering WHERE deleted=0 AND active=1 AND id IN (SELECT offeringId FROM offering_application WHERE applicationId=${aid}) ORDER BY id DESC LIMIT 1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Set Permission for Developer for transition">Set Permission for Developer for transition</a></td>
<td>[Arguments]</td>
<td>${input}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${id}=</td>
<td>Fetch DB Query Result</td>
<td>select id from offering where deleted=0 and active=1 order by id desc limit 1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Execute DB Query</td>
<td>update application_state_transition set developerAuthorized=${input} where applicationStateId=1 and nextStateId=2;</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid Platform Version ID">Get Valid Platform Version ID</a></td>
<td>${id}=</td>
<td>Fetch DB Query Result</td>
<td>select id from platform_version where platformId=1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid ApplicationID">Get Valid ApplicationID</a></td>
<td>${aid}=</td>
<td>Fetch DB Query Result</td>
<td>select applicationId from version order by applicationId desc;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${aid}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid Account Id and Name">Get Valid Account Id and Name</a></td>
<td>[Arguments]</td>
<td>${type}</td>
<td>${primary}=-1</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Documentation]</td>
<td class="colspan3" colspan="3">*Get Valid Account Id and Name* (type)\ntype: 1=Vender 2=Operator 3=Developer\n</td>
</tr>
<tr>
<td class="name"></td>
<td>${id}=</td>
<td>Fetch DB Query Result</td>
<td>select id from account where type=${type} and primaryAccount=${primary} and isDeactivated=0 order by id limit 1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${user}=</td>
<td>Fetch DB Query Result</td>
<td>select username from account where type=${type} and primaryAccount=${primary} and isDeactivated=0 order by id limit 1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td>${user}</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid Operator Account Id and Name">Get Valid Operator Account Id and Name</a></td>
<td>${id}</td>
<td>${user}=</td>
<td>Get Valid Account Id and Name</td>
<td>2</td>
</tr>
<tr>
<td class="name"></td>
<td>log</td>
<td>Use the operator user: ${user}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td>${user}</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid Developer Account Id and Name">Get Valid Developer Account Id and Name</a></td>
<td>${id}</td>
<td>${user}=</td>
<td>Get Valid Account Id and Name</td>
<td>3</td>
</tr>
<tr>
<td class="name"></td>
<td>log</td>
<td>Use the developer user: ${user}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td>${user}</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid Operator Sub Account Id and Name">Get Valid Operator Sub Account Id and Name</a></td>
<td>${aid}</td>
<td>${auser}=</td>
<td>Get Valid Account Id and Name</td>
<td>2</td>
</tr>
<tr>
<td class="name"></td>
<td>${id}</td>
<td>${user}=</td>
<td>Get Valid Account Id and Name</td>
<td>2</td>
</tr>
<tr>
<td class="name"></td>
<td>...</td>
<td>${aid}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>log</td>
<td>Use the operator user: ${user}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td>${user}</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid Developer Sub Account Id and Name">Get Valid Developer Sub Account Id and Name</a></td>
<td>${aid}</td>
<td>${auser}=</td>
<td>Get Valid Account Id and Name</td>
<td>3</td>
</tr>
<tr>
<td class="name"></td>
<td>${id}</td>
<td>${user}=</td>
<td>Get Valid Account Id and Name</td>
<td>3</td>
</tr>
<tr>
<td class="name"></td>
<td>...</td>
<td>${aid}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>log</td>
<td>Use the developer user: ${user}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td>${user}</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Insert Category for the Application">Insert Category for the Application</a></td>
<td>[Arguments]</td>
<td>${appname}</td>
<td>${category_name}</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${cid}=</td>
<td>Fetch DB Query Result</td>
<td>select id from category where name= '${category_name}' ;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${aid}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT id FROM application WHERE NAME= '${appname}' ;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Execute DB Query</td>
<td>delete from application_has_category where application_id=${aid} and category_id=${cid} ;</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Execute DB Query</td>
<td>insert into application_has_category values(${aid} , ${cid});</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Mouse Move At">Mouse Move At</a></td>
<td>[Arguments]</td>
<td>${locator}</td>
<td>${coordstring}</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Run Keyword</td>
<td>mouse__move(${locator}, ${coordstring})</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Delete Account">Delete Account</a></td>
<td>[Arguments]</td>
<td>${acct_name}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Execute DB Query</td>
<td>delete from account where username="${acct_name}"</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get VersionID which state is initial one">Get VersionID which state is initial one</a></td>
<td>${id}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT version_id FROM version_has_state WHERE application_state_id=1 ORDER BY version_id DESC limit 1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get 1st VersionID">Get 1st VersionID</a></td>
<td>${id}=</td>
<td>Fetch DB Query Result</td>
<td>select id from version order by id limit 1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid Fingerprint">Get Valid Fingerprint</a></td>
<td>${id}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT fingerprint FROM consumer LIMIT 1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get ApplicationID and OfferingID with Offering">Get ApplicationID and OfferingID with Offering</a></td>
<td>${aid}=</td>
<td>Fetch DB Query Result</td>
<td>select offapp.applicationId from offering_application offapp, offering off where offapp.offeringId = off.id and off.deleted = 0 and date_format(off.endDate,'%Y-%m-%d') &gt;= date_format(now(),'%Y-%m-%d')order by offapp.applicationId desc limit 1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${oid}=</td>
<td>Fetch DB Query Result</td>
<td>select offapp.offeringId from offering_application offapp, offering off where offapp.offeringId = off.id and off.deleted = 0 and date_format(off.endDate,'%Y-%m-%d') &gt;= date_format(now(),'%Y-%m-%d')order by offapp.applicationId desc limit 1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${oid}=</td>
<td>convert to string</td>
<td>${oid}</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${aid}</td>
<td>${oid}</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Is Valid ApplicationID">Is Valid ApplicationID</a></td>
<td>[Arguments]</td>
<td>${aid}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${result}=</td>
<td>Fetch DB Query Result</td>
<td>select count(*) from version where applicationid=${aid};</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${result}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get ApplicationName by ApplicationID">Get ApplicationName by ApplicationID</a></td>
<td>[Arguments]</td>
<td>${aid}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${aname}=</td>
<td>Fetch DB Query Result</td>
<td>select name from application where id=${aid};</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${aname}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid State">Get Valid State</a></td>
<td>${id}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT id FROM application_state WHERE instanceId=1 AND isLive=HEX(1) ORDER BY id DESC LIMIT 1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid Developer ID">Get Valid Developer ID</a></td>
<td>${id}=</td>
<td>Fetch DB Query Result</td>
<td>select id from account where type=3 and isDeactivated=0 limit 1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Another Developer Name">Get Another Developer Name</a></td>
<td>${id}=</td>
<td>Fetch DB Query Result</td>
<td>select username from account where type=3 and isDeactivated=0 order by id desc limit 1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Account Id and Name Which is without Subaccount">Get Account Id and Name Which is without Subaccount</a></td>
<td>${id}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT id FROM account WHERE id NOT IN (SELECT primaryAccount FROM account WHERE primaryAccount!=-1) and type=3 \ LIMIT 1</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${name}=</td>
<td>Fetch DB Query Result</td>
<td>select username from account where id=${id};</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td>${name}</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Delete Version Localization">Delete Version Localization</a></td>
<td>[Arguments]</td>
<td>${vid}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Execute DB Query</td>
<td>DELETE FROM localization WHERE identifier=${vId}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Recommendation by App ID">Get Recommendation by App ID</a></td>
<td>[Arguments]</td>
<td>${aid}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${result}=</td>
<td>Fetch DB Query Result</td>
<td>select name from recommendation where identifier=${aid};</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${result}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid ContentOwner and its ApplicationID">Get Valid ContentOwner and its ApplicationID</a></td>
<td>${Owner}=</td>
<td>Fetch DB Query Result</td>
<td>select publisher from application where ownedByDeveloper=0 and publisher!='';</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${id}=</td>
<td>Fetch DB Query Result</td>
<td>select id from application where ownedByDeveloper=0 and publisher!='';</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${Owner}</td>
<td>${id}</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid Consumer Group">Get Valid Consumer Group</a></td>
<td>${group}=</td>
<td>Fetch DB Query Result</td>
<td>select name from consumer_group where instanceId=1 order by id limit 1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${group}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get another operator Name">Get another operator Name</a></td>
<td>${user}=</td>
<td>Fetch DB Query Result</td>
<td>select username from account where type=2 and primaryAccount=-1 order by id desc limit 1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${user}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid License ID">Get Valid License ID</a></td>
<td>${id}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT id FROM license_model ORDER BY id;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid Gid">Get Valid Gid</a></td>
<td>[Documentation]</td>
<td class="colspan3" colspan="3">white list</td>
</tr>
<tr>
<td class="name"></td>
<td>${gid}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT identifier FROM gid WHERE stateWhiteListId=(SELECT id FROM state_white_list LIMIT 1) LIMIT 1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${gid}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Delete offering">Delete offering</a></td>
<td>[Arguments]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Execute DB Query</td>
<td>Delete from offering_application WHERE offeringId=${Id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Execute DB Query</td>
<td>Delete FROM offering_has_license_model WHERE offering_id=${Id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Execute DB Query</td>
<td>Delete FROM license WHERE offeringId=${Id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Execute DB Query</td>
<td>Delete FROM offering WHERE id=${Id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid Application ID from State">Get Valid Application ID from State</a></td>
<td>[Arguments]</td>
<td>${state}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${ownerid}</td>
<td>Get OwnerId for Application</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${id}=</td>
<td>Fetch DB Query Result</td>
<td>select ver.applicationId from version_has_state vhs,version ver,application app,account acc where vhs.version_id=ver.id and ver.applicationId=app.id and app.ownerAccount=acc.id and vhs.application_state_id = ${state} and app.ownerAccount=${ownerid} order by ver.applicationId limit 1</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid Recommendation List pubID and Name">Get Valid Recommendation List pubID and Name</a></td>
<td>${id}=</td>
<td>Fetch DB Query Result</td>
<td>select publicId from recommendation_list where instanceId=1 order by endDate;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${name}=</td>
<td>Fetch DB Query Result</td>
<td>select name from recommendation_list where instanceId=1 order by endDate;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td>${name}</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get OwnerId for Application">Get OwnerId for Application</a></td>
<td>${id}</td>
<td>Fetch DB Query Result</td>
<td>select id from account where username="${DEFAULT_DEVELOPER}"</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid Application ID with recommandation">Get Valid Application ID with recommandation</a></td>
<td>${id}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT identifier FROM recommendation WHERE recommendationListId=1</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid Consumer Metadata Value">Get Valid Consumer Metadata Value</a></td>
<td>[Arguments]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${metadata}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT VALUE FROM metadata WHERE realm='consumer' and identifier=${id}</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${metadata}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get ConsumerId with valid License">Get ConsumerId with valid License</a></td>
<td>${id}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT consumerId FROM license ORDER BY id LIMIT 1</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Company name for account">Get Company name for account</a></td>
<td>[Arguments]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${company}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT company FROM \ account WHERE id=${id}</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${company}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Newest Valid ApplicationID">Get Newest Valid ApplicationID</a></td>
<td>${aid}=</td>
<td>Fetch DB Query Result</td>
<td>select applicationId from version order by applicationId desc;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${aid}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Set inactive User">Set inactive User</a></td>
<td>[Arguments]</td>
<td>${user}</td>
<td>${isDeactivated}=1</td>
<td># 1=inactive, 0=active</td>
</tr>
<tr>
<td class="name"></td>
<td>Execute DB Query</td>
<td>update account set failedLogins=0,isDeactivated=${isDeactivated} \ where username='${user}'</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${user}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid VersionID and Link Owned by a developer">Get Valid VersionID and Link Owned by a developer</a></td>
<td>[Arguments]</td>
<td>${developer}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${id}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT id FROM version WHERE applicationId=(SELECT id FROM application WHERE ownerAccount =(SELECT id FROM account WHERE username='${developer}') order by id desc LIMIT 1) limit 1</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${link}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT URL FROM version WHERE applicationId=(SELECT id FROM application WHERE ownerAccount =(SELECT id FROM account WHERE username='${developer}') order by id desc \ LIMIT 1) limit 1</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td>${link}</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get a Valid AppID Owned by a developer">Get a Valid AppID Owned by a developer</a></td>
<td>[Arguments]</td>
<td>${developer}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${id}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT id FROM application WHERE ownerAccount =(SELECT id FROM account WHERE username='${developer}') LIMIT 1</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Set failedLogins Too Many Times User">Set failedLogins Too Many Times User</a></td>
<td>[Arguments]</td>
<td>${user}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Execute DB Query</td>
<td>update account set failedLogins=10,isDeactivated=1 where username='${user}'</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get nextstate by Version ID">Get nextstate by Version ID</a></td>
<td>[Arguments]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${result}=</td>
<td>Fetch DB Query Result</td>
<td>\ SELECT NAME FROM application_state WHERE id=(SELECT nextStateId FROM application_state_transition WHERE applicationStateId=(SELECT application_state_id FROM version_has_state WHERE version_id=${id}) limit 1)</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${result}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get VersionID which state is initial one own by a developer">Get VersionID which state is initial one own by a developer</a></td>
<td>[Arguments]</td>
<td>${developer}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${id}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT version_id FROM version_has_state WHERE version_id = (SELECT id FROM version WHERE applicationId=(SELECT id FROM application WHERE owneraccount=(SELECT id FROM account WHERE username='${developer}') LIMIT 1) LIMIT 1) \ LIMIT 1;</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get VersionID with valid consumer license">Get VersionID with valid consumer license</a></td>
<td>[Arguments]</td>
<td>${finger}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${id}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT id FROM version WHERE applicationId=(SELECT applicationId FROM offering_application WHERE offeringId=(SELECT offeringId FROM license WHERE consumerId=(SELECT id FROM consumer WHERE fingerprint='${finger}') LIMIT 1) LIMIT 1) ORDER BY id DESC LIMIT 1</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${url}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT URL FROM version WHERE applicationId=(SELECT applicationId FROM offering_application WHERE offeringId=(SELECT offeringId FROM license WHERE consumerId=(SELECT id FROM consumer WHERE fingerprint='${finger}') LIMIT 1) LIMIT 1) ORDER BY id DESC LIMIT 1</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${id}</td>
<td>${url}</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get fingerprint by Application ID">Get fingerprint by Application ID</a></td>
<td>[Arguments]</td>
<td>${aid}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${result}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT fingerprint FROM consumer WHERE id=(SELECT consumerId FROM license WHERE offeringId=(SELECT offeringId FROM offering_application WHERE applicationid=${aid} LIMIT 1) LIMIT 1)</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${result}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Set Application State Editable">Set Application State Editable</a></td>
<td>[Arguments]</td>
<td>${editable}=1</td>
<td># 1=editable, 0=uneditable</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Execute DB Query</td>
<td>update application_state set isContentEditable=${editable}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Fingerprint by consumerid">Get Fingerprint by consumerid</a></td>
<td>[Arguments]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${result}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT fingerprint FROM consumer WHERE id=${id}</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${result}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Application ID with offering by consumer">Get Application ID with offering by consumer</a></td>
<td>[Arguments]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${aid}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT applicationId FROM offering_application WHERE offeringId=(SELECT offeringId FROM license WHERE consumerId=${id} LIMIT 1) LIMIT 1</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${aid}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get Valid OfferingID by consumer">Get Valid OfferingID by consumer</a></td>
<td>[Arguments]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${oid}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT offeringId FROM license WHERE consumerId=${id} LIMIT 1</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${oid}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Get CategoryID by ApplicationID">Get CategoryID by ApplicationID</a></td>
<td>[Arguments]</td>
<td>${id}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>${cid}=</td>
<td>Fetch DB Query Result</td>
<td>SELECT category_id FROM application_has_category WHERE application_id=${id}</td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>[Return]</td>
<td>${cid}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"><a name="keyword_Set back failedLogins User">Set back failedLogins User</a></td>
<td>[Arguments]</td>
<td>${user}</td>
<td></td>
<td></td>
</tr>
<tr>
<td class="name"></td>
<td>Execute DB Query</td>
<td>update account set failedLogins=0, isDeactivated=0 where username='${user}'</td>
<td></td>
<td></td>
</tr>
</table>
</body>
</html>
